package com.springcloud.config_client;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConfigController {

	@Value("${user.name}")
	private String username;
	
	@Value("${user.email}")
	private String useremail;
	
	@RequestMapping("/config")
	public Map config(){
		Map configmap=new HashMap<String,String>();
		
		configmap.put("username",username);
		configmap.put("useremail",useremail);
		return configmap;
				
	}
}
